package com.example.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author testjava
 * @since 2022-08-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Forum implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "fid", type = IdType.AUTO)
    private Integer fid;
    private String name;
    private String description;
    private Integer position;
    @TableField("topicCount")
    private Integer topicCount;//当前版块中的主题数量
    @TableField("articleCount")
    private Integer articleCount;//当前版块中的文章数量,主题数+回复数
    @TableField("lastTopicId")
    private Integer lastTopicId;

    @TableField(exist = false)
    private List<ForumTopic> topices;//当前版块中的主题集合
    @TableField(exist = false)
    private ForumTopic lastTopic;//当前版块中的最后一个主题


}
